#ifndef __LCD12864_H__
#define __LCD12864_H__

#include <REGX52.H>

// 定义LCD12864接口
#define LCD_DATA P0
sbit LCD_RS = P2^0;
sbit LCD_RW = P2^1;
sbit LCD_EN = P2^2;
sbit LCD_CS1 = P2^3;
sbit LCD_CS2 = P2^4;
sbit LCD_RST = P2^5;

// 函数声明
void delay_ms(unsigned int ms);
void LCD_WriteCmd(unsigned char cmd);
void LCD_WriteData(unsigned char dat);
void LCD_SetPos(unsigned char x, unsigned char y);
void LCD_Init(void);
void LCD_Clear(void);
void LCD_ShowChinese(unsigned char x, unsigned char y, unsigned char *ch);
void LCD_ShowChar(unsigned char x, unsigned char y, unsigned char *ch);

#endif